# coding=utf-8
import time

import traceback
from monthdelta import monthdelta
import datetime
import requests
from pymongo import MongoClient
import Utils
import sys
from pandas import DataFrame
import pandas as pd
import json

import pymongo
reload(sys)
sys.setdefaultencoding('utf-8')


mgClient = MongoClient('121.40.54.235', 27017,
    username='root2',
    password='Dream2015',
    authSource="stockDataStore",
    authMechanism='SCRAM-SHA-1')
db = mgClient['stockDataStore']

#db.balance_sheet.update_many({}, {'$rename': { "报表日期": "period" } })
db.profit_statement.update_many({}, {'$rename': { "报表日期": "period" } })
db.cash_flow.update_many({}, {'$rename': { "报表日期": "period" } })


